<?php

namespace App\Containers\AppSection\Project\Traits;

use App\Containers\AppSection\Project\Tasks\FindProjectByIdTask;

trait IsOwnerProfileTrait
{
    public function isOwnerProfile(): bool
    {
        $project = app(FindProjectByIdTask::class)->run($this->id);

        return $this->profile()->id === $project->profile->id;
    }
}
